Skip to content

Comments

Mempool/decoded opnet tx#236

Merged
BlobMaster41 merged 8 commits intomainfrom
mempool/decoded-opnet-tx
Feb 21, 2026
Merged

Mempool/decoded opnet tx#236
BlobMaster41 merged 8 commits intomainfrom
mempool/decoded-opnet-tx

Conversation

@BlobMaster41
Copy link
Contributor

@BlobMaster41 BlobMaster41 commented Feb 20, 2026

Description

Replace the old isOPNet boolean with a transactionType enum and add OPNet-specific optional fields (theoreticalGasLimit, priorityFee, from, contractAddress, calldata, bytecode). Updated protobuf, JSON-RPC types, DB interfaces, repository conversions, and indexes to store and query transactionType and OPNet fields. Adjusted mempool, broadcast, and websocket flows to propagate transactionType (defaulting to Generic for non-OPNet txs). Enhanced the Bitcoin transaction verificator to decode OPNet transactions and populate shared/interaction/deployment properties. Also added .serena/ to .gitignore.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Performance improvement
  • Consensus change (changes that affect state calculation or validation)
  • Refactoring (no functional changes)
  • Documentation update
  • CI/CD changes
  • Dependencies update

Checklist

Build & Tests

  • npm install completes without errors
  • npm run build completes without errors
  • npm test passes all tests

Code Quality

  • Code follows the project's coding standards
  • No new compiler warnings introduced
  • Error handling is appropriate
  • Logging is appropriate for debugging and monitoring

Documentation

  • Code comments added for complex logic
  • Public APIs are documented
  • README updated (if applicable)

Security

  • No sensitive data (keys, credentials) committed
  • No new security vulnerabilities introduced
  • RPC endpoints properly authenticated
  • Input validation in place for external data

OPNet Node Specific

  • Changes are compatible with existing network state
  • Consensus logic changes are documented and tested
  • State transitions are deterministic
  • WASM VM execution is reproducible across nodes
  • P2P protocol changes are backward-compatible (or migration planned)
  • Database schema changes include migration path
  • Epoch finality and PoC/PoW logic unchanged (or documented if changed)

Testing

Consensus Impact

Related Issues


By submitting this PR, I confirm that my contribution is made under the terms of the project's license.

Detect and correctly convert MongoDB Binary or Uint8Array values for transaction.hash, transaction.id, and inputs.originalTransactionId instead of assuming Uint8Array. Removes unused toBase64 import and adds conditional branches that use toHex for Uint8Array or .toString('hex') for Binary to avoid runtime errors when documents store Binary values. Small refactor to introduce local variables for clarity.
Remove the enableVerification boolean from TransactionFactory (and corresponding argument usage) to simplify construction. Update IMempoolTransaction: replace boolean isOPNet with transactionType: OPNetTransactionTypes, add optional from: Address, and import required types. Adjust BitcoinTransactionVerificatorV2 to set transaction.transactionType, assign gas/priority fields, and populate the from property for Interaction transactions via insertInteractionProperty. Also includes minor import/formatting cleanup.
Replace the old isOPNet boolean with a transactionType enum and add OPNet-specific optional fields (theoreticalGasLimit, priorityFee, from, contractAddress, calldata, bytecode). Updated protobuf, JSON-RPC types, DB interfaces, repository conversions, and indexes to store and query transactionType and OPNet fields. Adjusted mempool, broadcast, and websocket flows to propagate transactionType (defaulting to Generic for non-OPNet txs). Enhanced the Bitcoin transaction verificator to decode OPNet transactions and populate shared/interaction/deployment properties. Also added .serena/ to .gitignore.
Run code-style/formatting pass across the codebase. Changes include reflowing long lines, normalizing import blocks, consistent ternary and object formatting, wrapping function arguments, and standardizing quotes in OpenAPI examples. Numerous files across API routes, websocket handlers, blockchain indexer, RPC types and VM/storage were touched; these are stylistic only and do not change runtime behavior.
@BlobMaster41 BlobMaster41 added the enhancement New feature or request label Feb 20, 2026
Remove legacy BECH32 and BASE58 config types and related parsing/verification from config interfaces, BtcIndexerConfig and BtcIndexerConfigLoader. Update numerous default settings to new operational values: disable DOCS by default, enable INDEXER, tighten ALLOW_PURGE, raise UTXO save interval and start height, flip several DEV debug flags, enable POC, adjust P2P port and peer timeout, increase API threads and pending limits, raise transaction broadcast and pending call capacities, increase UTXO limit, change RPC concurrency, tweak OP_NET thresholds/prefetch/light-mode start, and other minor numeric formatting changes. Also update RoswellConsensus activation block to a much larger value (1_000_000_000n). These changes simplify config surface area and tune runtime defaults for current deployment/testing needs.
Remove the deprecated/unused ENABLED_AT_BLOCK setting from OP_NET across config samples, tests, autoconfig script, and the default in BtcIndexerConfigLoader. Files updated: docker/config/btc.conf.example, src/config/btc.sample.conf, tests/config/btc.unit.test.conf, tools/autoconfig.sh, and src/src/config/BtcIndexerConfigLoader.ts. This reduces duplicated/deprecated defaults and clarifies that OP_NET behavior is controlled by MODE/REINDEX and related settings.
@BlobMaster41 BlobMaster41 merged commit c6af33b into main Feb 21, 2026
7 checks passed
@BlobMaster41 BlobMaster41 deleted the mempool/decoded-opnet-tx branch February 21, 2026 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant